/*
项目名称：蜂鸣器实验学习
项目日期：20200922
项目目的：蜂鸣器间歇性响起
项目备注：进阶任务：流水灯增加报警效果
*/
#include "reg52.h"
#include "..\H_File\lanqin.h"

int main(){
    //进阶任务
    #if true
        int i;
        while(1) {
            buzzer = 0;
            P1 = 0xFE;
            for(i = 0;i < 8;i++){
                delay(100);
                buzzer = 1;
                delay(200);
                buzzer = 0; 
                P1 <<= 1;
                P1 = P1 | 0x01;
            }
        }
    #endif

    //基础任务
        while(1) {
            buzzer = 0;
            delay(200);
            buzzer = 1;
            delay(200);
        }
    return 0;
}